﻿using System;
using System.Runtime.InteropServices;
using System.Text;

namespace System.Utility.Win32
{
	// Token: 0x0200006C RID: 108
	public class Win32
	{
		// Token: 0x06000422 RID: 1058
		[DllImport("kernel32.dll")]
		public static extern void CloseHandle(IntPtr hObject);

		// Token: 0x06000423 RID: 1059
		[DllImport("kernel32")]
		public static extern long WritePrivateProfileString(string section, string key, string val, string filePath);

		// Token: 0x06000424 RID: 1060
		[DllImport("kernel32")]
		public static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath);

		// Token: 0x06000425 RID: 1061
		[DllImport("kernel32")]
		public static extern uint GetPrivateProfileString(string lpAppName, string lpKeyName, string lpDefault, byte[] lpReturnedString, uint nSize, string lpFileName);

		// Token: 0x06000426 RID: 1062
		[DllImport("kernel32.dll", EntryPoint = "GetDiskFreeSpaceExA")]
		public static extern int GetDiskFreeSpaceEx(string lpRootPathName, out long lpFreeBytesAvailable, out long lpTotalNumberOfBytes, out long lpTotalNumberOfFreeBytes);

		// Token: 0x06000427 RID: 1063
		[DllImport("gdi32.dll")]
		public static extern bool DeleteObject(IntPtr hObject);

		// Token: 0x06000428 RID: 1064
		[DllImport("user32.dll")]
		public static extern IntPtr FindWindow(string className, string windowName);

		// Token: 0x06000429 RID: 1065
		[DllImport("user32.dll")]
		public static extern IntPtr FindWindowEx(IntPtr handlerParent, int handlerChildAfter, string childClassName, string childWindowName);

		// Token: 0x0600042A RID: 1066 RVA: 0x00013658 File Offset: 0x00011858
		public static IntPtr FindWindowByText(string windowName)
		{
			return Win32.FindWindow(null, windowName);
		}

		// Token: 0x0600042B RID: 1067 RVA: 0x00013674 File Offset: 0x00011874
		public static IntPtr FindWindowByText(IntPtr handlerParent, string childWindowName)
		{
			return Win32.FindWindowEx(handlerParent, 0, null, childWindowName);
		}

		// Token: 0x0600042C RID: 1068 RVA: 0x00013690 File Offset: 0x00011890
		public static IntPtr FindWindowByText(IntPtr handlerParent, int handlerChildAfter, string childWindowName)
		{
			return Win32.FindWindowEx(handlerParent, handlerChildAfter, null, childWindowName);
		}

		// Token: 0x0600042D RID: 1069 RVA: 0x000136AC File Offset: 0x000118AC
		public static IntPtr FindWindowByClass(string className)
		{
			return Win32.FindWindow(null, className);
		}

		// Token: 0x0600042E RID: 1070 RVA: 0x000136C8 File Offset: 0x000118C8
		public static IntPtr FindWindowByClass(IntPtr handlerParent, string childClassName)
		{
			return Win32.FindWindowEx(handlerParent, 0, childClassName, null);
		}

		// Token: 0x0600042F RID: 1071 RVA: 0x000136E4 File Offset: 0x000118E4
		public static IntPtr FindWindowByClass(IntPtr handlerParent, int handlerChildAfter, string childClassName)
		{
			return Win32.FindWindowEx(handlerParent, handlerChildAfter, childClassName, null);
		}

		// Token: 0x06000430 RID: 1072 RVA: 0x00013700 File Offset: 0x00011900
		public static IntPtr FindWindowByClass(int handlerChildAfter, string childClassName)
		{
			return Win32.FindWindowEx(IntPtr.Zero, handlerChildAfter, childClassName, null);
		}

		// Token: 0x06000431 RID: 1073 RVA: 0x00013720 File Offset: 0x00011920
		public static bool HideWindow(IntPtr handlerWindow)
		{
			return Win32.ShowWindow(handlerWindow, 0u);
		}

		// Token: 0x06000432 RID: 1074
		[DllImport("user32.dll")]
		private static extern bool ShowWindow(IntPtr handlerWindow, uint cmd);

		// Token: 0x06000433 RID: 1075
		[DllImport("user32.dll")]
		public static extern bool SetWindowLong(IntPtr handlerWindow, int nIndex, int newLong);
	}
}
